package com.zjhcsoft.auth.common.constant;

import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component("mybatisPlusKeyGenerator")
public class MybatisPlusKeyGenerator implements IKeyGenerator {
    @Override
    public String executeSql(String incrementerName) {
        log.info("执行自定义Key生成器，参数：{}",incrementerName);
        return "SELECT seq_auth.NEXTVAL FROM DUAL";
    }
}